/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package library.FileFilters;

import library.JpegNodes.*;

/**
 * This class is intended to find the Jpeg files to check.
 * @author JNC
 */
public class CheckFileFilter extends JpegFileFilter {

    /**
     * Constructor.
     * Will match only well-formed filenames, taking into account the following patterns :
     * <ul>
     * <li> Class_JpegFile._FILENAME_PATTERN_PHOTO
     * <li> Class_JpegFile._FILENAME_PATTERN_SCAN
     * </ul>
     * @param myMatchIfDirectory
     * Indicates if the files to rename must be found also in sub-directories (true)
     * or only in the given directory (false)
     */
    public CheckFileFilter(boolean myMatchIfDirectory) {
        super(myMatchIfDirectory, true);
        // first arg indicates whether sub-directories should match
        // second arg indicated that well-formed filenames should be matched
        
        // add the patterns
        addPattern(JpegFile._FILENAME_PATTERN_PHOTO);
        addPattern(JpegFile._FILENAME_PATTERN_SCAN);
    }
}
